package com.wyj.wuliwuli.common;

import org.springframework.http.HttpStatus;

/**
 * @Author wyj
 * @Date 2022.2.14 21:33
 * @Version 1.0
 * @Description
 */

public class ResultFactory {
    /**
     * 失败
     * @param message
     * @return
     */
    public static AjaxResult buildFailResult(String message) {
        return new AjaxResult(HttpStatus.BAD_REQUEST.value(), message, null);
    }

    /**
     * 成功
     * @return
     */
    public static AjaxResult buildSuccessResult() {
        return new AjaxResult(HttpStatus.OK.value(), "ok", null);
    }
}
